charger30 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

Charger 30 Click example. More...

#include "board.h"
#include "log.h"
#include "charger30.h"

Functions

void application_init (void)
void application_task (void)
int main (void)

Detailed Description

Charger 30 Click example.

Description

This example demonstrates the use of the Charger 30 Click board by reading and logging the charging status, input and battery voltage, current consumption, and fault diagnostics. The demo configures the default setup and then periodically polls for system status and fault information.

The demo application is composed of two sections:

Application Init

Initializes the logger and the Charger 30 Click driver and applies the default configuration.

Application Task

Periodically reads and logs charger status and fault registers along with voltage, current.

Note
Ensure a valid power supply and a battery are connected for proper functionality.
Author
Stefan Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )